//
//  WBComposeButton.swift
//  sinaWeibo
//
//  Created by 吴熠 on 16/11/21.
//  Copyright © 2016年 吴熠. All rights reserved.
//

import UIKit

let btnW : CGFloat = 80
let btnH : CGFloat = 110

class WBComposeButton: UIButton {


    override init(frame: CGRect) {
        super.init(frame: frame)
        self.titleLabel?.textAlignment = .center
        self.titleLabel?.font = UIFont.systemFont(ofSize: 16)
        self.setTitleColor(UIColor.darkGray, for: .normal)
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //返回title的frame
    override func titleRect(forContentRect contentRect: CGRect) -> CGRect {
        return CGRect(x: 0, y: btnW, width: btnW, height: btnH-btnW)
    }
    
    override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
        return CGRect(x: 0, y: 0, width: btnW, height: btnW)
    }
    
}
